using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace Hawkeye
{
  class Program
  {
    static void Main(string[] args)
    {
      string[] paths = Directory.GetFiles(Environment.CurrentDirectory, "*.cs", SearchOption.AllDirectories);
      StringBuilder text = new StringBuilder();
      foreach (string path in paths)
        text.AppendLine(File.ReadAllText(path));
      Hawk hawk = new Hawk(new HawkService(new FrequencyTableProducer()));
      File.WriteAllText(Path.Combine(Environment.CurrentDirectory, "FreqTable.html"), hawk.Handle(text.ToString()));
    }
  }
}
